import request from "@/utils/request"

export function queryRolePage(data) {
  return request({
    url: "/puser/queryRolePage",
    method: "get",
    params: data
  })
}

export function queryRoleList(data) {
  return request({
    url: "/puser/queryRoleList",
    method: "get",
    params: data
  })
}

export function insertRole(data) {
  return request({
    url: "/puser/insertRole",
    method: "post",
    data: data
  })
}

export function updateRole(data) {
  return request({
    url: "/puser/updateRole",
    method: "post",
    data: data
  })
}

export function deleteRole(data) {
  return request({
    url: "/puser/deleteRole",
    method: "post",
    data: data
  })
}

export function queryRoleToMenu(data) {
  return request({
    url: "/puser/queryRoleToMenu",
    method: "get",
    params: data
  })
}

export function updateRoleToMenu(data) {
  return request({
    url: "/puser/updateRoleToMenu",
    method: "post",
    data
  })
}

export function queryRoleToButton(data) {
  return request({
    url: "/puser/queryRoleToButton",
    method: "get",
    params: data
  })
}
